package com.model.prototype;

/**
 * @author: cxt
 * @time: 2022/2/21
 * 形状抽象类
 */
public abstract class Shape implements Cloneable {
    private String id;

    protected String type;

    public abstract void draw();

    public String getType() {
        return type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Object clone = null;
        try {
            clone = super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }
}
